package com.nextplus.housetolet.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.nextplus.common.domain.SuperEntity;

/**
 * 租赁关系
 * 
 * @author didi
 *
 * 创建时间：2013-1-3
 *
 */
@Entity
@Table(name = "rental")
public class Rental extends SuperEntity {

	private String customerName;		// 客户姓名
	private String customerId;			// 客户证件号码
	private String customerTel;			// 客户电话
	private String idPicture;			// 证件照片
	
	private Date startDate;				// 起租日期
	private Date endDate;				// 结束日期
	private Date createDate;			// 创建日期
	
	private Double startElect;			// 起租电表读数
	private Double endElect;			// 结束电表读数
	private Double startWater;			// 起租水表读数
	private Double endWater;			// 结束水表读数
	
	private Boolean hasNet;				// 是否使用网络
	private Double basePayment;			// 基础房租
	private String otherInfo;			// 其他备注信息
	
	@ManyToOne
	@JoinColumn(name="room_id")
	private Room room;
	@ManyToOne
	@JoinColumn(name="user_id")
	private User user;
	@OneToMany(mappedBy="room")
	private List<Payment> payments = new ArrayList<Payment>();
	
	
	public String getCustomerName() {
		return customerName;
	}
	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}
	public String getCustomerId() {
		return customerId;
	}
	public void setCustomerId(String customerId) {
		this.customerId = customerId;
	}
	public String getCustomerTel() {
		return customerTel;
	}
	public void setCustomerTel(String customerTel) {
		this.customerTel = customerTel;
	}
	public String getIdPicture() {
		return idPicture;
	}
	public void setIdPicture(String idPicture) {
		this.idPicture = idPicture;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Double getStartElect() {
		return startElect;
	}
	public void setStartElect(Double startElect) {
		this.startElect = startElect;
	}
	public Double getEndElect() {
		return endElect;
	}
	public void setEndElect(Double endElect) {
		this.endElect = endElect;
	}
	public Double getStartWater() {
		return startWater;
	}
	public void setStartWater(Double startWater) {
		this.startWater = startWater;
	}
	public Double getEndWater() {
		return endWater;
	}
	public void setEndWater(Double endWater) {
		this.endWater = endWater;
	}
	public Boolean getHasNet() {
		return hasNet;
	}
	public void setHasNet(Boolean hasNet) {
		this.hasNet = hasNet;
	}
	public Double getBasePayment() {
		return basePayment;
	}
	public void setBasePayment(Double basePayment) {
		this.basePayment = basePayment;
	}
	public String getOtherInfo() {
		return otherInfo;
	}
	public void setOtherInfo(String otherInfo) {
		this.otherInfo = otherInfo;
	}
	public Room getRoom() {
		return room;
	}
	public void setRoom(Room room) {
		this.room = room;
	}
	public List<Payment> getPayments() {
		return payments;
	}
	public void setPayments(List<Payment> payments) {
		this.payments = payments;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}

}
